You are here: Statements and Functions > Log
Syntax samples
LOG <string>, <expression>
LOG "Activity Time", Attr1
ProModel assumes that the time stored in the expression is in the model’s default time units set in the General Information dialog box. Use the LOG statement to record the time from one statement to another statement by storing the time of the first statement in an attribute, variable, or array element with CLOCK() and using the same attribute, variable, or array element as the expression in the LOG statement. Use the LOG statement to determine throughput time or throughput in a particular section of the facility.
Downtime logic, location processing logic, node entry and exit logic, and routing exit logic.
Components
<string>
This string will be stored in the file before the result of the log expression and may not be a string expression. Use this string to identify the number that follows.
<expression>
The result of this expression subtracted from the model’s current time will be stored in the file <model name>.LAP, after the string above.
Example
The example below shows a LOG statement used to capture each Client’s total throughput time as they travel through the system. Time starts when the Client arrives at Receptionist and stops when the Client exits through the door. The first process sets attribute CT equal to the current clock time. Next, Clients are sent randomly to one of three offices. Finally, when a Client leaves the system at location OutDoor, the LOG statement records the cycle time by subtracting the time stored in attribute CT from the current simulation time.
Process Table
Entity |
Location |
Operation (min) |
---|---|---|
Client |
Reception |
CT=CLOCK() |
Client |
Auditor |
WAIT T(5,6,8) |
Client |
Loan |
WAIT T(4.5,5,7) |
Client |
Service |
WAIT N(6.2,1.1) |
Client |
OutDoor |
LOG "Cycle Time", CT |
Routing Table
Blk |
Output |
Destination |
Rule |
Move Logic |
---|---|---|---|---|
1 |
Client |
Auditor Loan Service |
RANDOM 1 RANDOM RANDOM |
MOVE FOR 1.5 |
1 |
Client |
OutDoor |
FIRST 1 |
MOVE FOR 0.5 |
1 |
Client |
OutDoor |
FIRST 1 |
MOVE FOR 0.5 |
1 |
Client |
OutDoor |
FIRST 1 |
MOVE FOR 1.2 |
1 |
Client |
EXIT |
|
|
WRITE, WRITELINE, and READ. Also see External Files.